package com.ruitu.mall_98_seller.support.util;

import android.text.TextUtils;
import android.widget.TextView;

public class ViewUtil {

    public static boolean isTvEmpty(TextView tv) {
        if (null == tv) throw new NullPointerException("不能传入空的控件!");
        return TextUtils.isEmpty(getTvTxt(tv));
    }

    public static String getTvTxt(TextView tv) {
        if (null == tv) throw new NullPointerException("不能传入空的控件!");
        return tv.getText().toString().trim();
    }
}
